package com.hg.design.behavior.memento.biancheng.ex2;

//发起人角色:相亲者
public class You {
    private String wifeName;//妻子

    public String getWife() {
        return wifeName;
    }

    public void setWife(String wifeName) {
        this.wifeName = wifeName;
    }

    public Girl createMemento() {
        return new Girl(this.wifeName);
    }

    public void restoreMemento(Girl p) {
        setWife(p.getName());
    }
}
